package adv6.thread;

/**
 * @author oldliu
 * @since 1.0
 */
public class Thread2 implements Runnable{
    private String name;
    public Thread2(String name){
        this.name=name;
    }
    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            System.out.println(name+"==="+i);
        }
    }

    public static void main(String[] args) {
        for (int i = 1; i <= 6; i++) {
            new Thread(new Thread2("线程---"+i)).start();
        }
    }
}
